package com.hutao.manage.pojo;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

import com.hutao.manage.util.JaxbUtil;

@XmlRootElement(name = "Response")
@XmlAccessorType(XmlAccessType.FIELD)
public class ResponseTest {
	
	private Integer ResultCode;
	
	private String ResultContent;

	public Integer getResultCode() {
		return ResultCode;
	}

	public void setResultCode(Integer resultCode) {
		ResultCode = resultCode;
	}

	public String getResultContent() {
		return ResultContent;
	}

	public void setResultContent(String resultContent) {
		ResultContent = resultContent;
	}
	
	
	
	
	
	
	@Override
	public String toString() {
		return "ResponseTest [ResultCode=" + ResultCode + ", ResultContent=" + ResultContent + "]";
	}

	public static void main(String[] args) throws Exception {
		//String xml ="<Response><ResultCode>0</ResultCode><ResultContent>成功</ResultContent></Response>";
		//ResponseTest responseTest = JaxbUtil.converyToJavaBean(xml, ResponseTest.class);
		
		String xml ="<?xml version='1.0' encoding='UTF-8' standalone='yes'?>"+
					"<Response>"+
	    			"	<ResultCode>0</ResultCode>"+
	    			"	<ResultContent>成功</ResultContent>"+
					"</Response>";
		
		ResponseTest responseTest = JaxbUtil.converyToJavaBean(xml, ResponseTest.class);
		System.out.println(responseTest);
		
		/*
		 * ResponseTest responseTest = new ResponseTest();
		 * responseTest.setResultCode(0); responseTest.setResultContent("成功");
		 * 
		 * 
		 * System.out.println(JaxbUtil.convertToXml(responseTest));
		 */
	}
	
	

}
